﻿using XCore.Domain;
using SaaS.Core;
using Web.System.Utils;
using XCore.Dependency;

namespace Web.System.Services
{
    public abstract class SystemApplicationServiceBase : ApplicationServiceBase
    {
        /// <summary>
        /// 日志记录
        /// </summary>
        protected SystemLogger Logger
        {
            get
            {
                return IocCollection.Resolve<SystemLogger>();
            }
        }
        /// <summary>
        /// 用户信息
        /// </summary>
        protected SystemSession Session
        {
            get
            {
                return IocCollection.Resolve<SystemSession>();
            }
        }

        public SystemApplicationServiceBase() : base(CoreSetting.DefaultConnectionString)
        {

        }
        /// <summary>
        /// 读库
        /// </summary>
        protected SystemDbContext SDC
        {
            get
            {
                return IocCollection.Resolve<SystemDbContext>();
            }
        }
    }
}
